package com.itkim.work.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

public class YzWorkRes extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 作品唯一标识 */
    @JsonFormat(shape = JsonFormat.Shape.STRING) //把Long类型转为String类型传输给前端
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long workId;

    /** 学校 */
    @Excel(name = "学校")
    private String school;

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /** 外键，主表是yz_user表 */
    @Excel(name = "外键，主表是yz_user表")
    private Long userId;

    /** 报名组别 */
    @Excel(name = "报名组别")
    private String group;

    /** 作品名称 */
    @Excel(name = "作品名称")
    private String workName;

    /** 参赛姓名 */
    @Excel(name = "参赛姓名")
    private String entrantName;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String contactInfo;

    /** 实时平均分 */
    @Excel(name = "实时平均分")
    private Integer averageScore;

    /** 所属课程 */
    @Excel(name = "所属课程")
    private String course;

    /** 浏览次数 */
    @Excel(name = "浏览次数")
    private Long visitNumber;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "提交时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setWorkId(Long workId)
    {
        this.workId = workId;
    }

    public Long getWorkId()
    {
        return workId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setGroup(String group)
    {
        this.group = group;
    }

    public String getGroup()
    {
        return group;
    }
    public void setWorkName(String workName)
    {
        this.workName = workName;
    }

    public String getWorkName()
    {
        return workName;
    }
    public void setEntrantName(String entrantName)
    {
        this.entrantName = entrantName;
    }

    public String getEntrantName()
    {
        return entrantName;
    }
    public void setContactInfo(String contactInfo)
    {
        this.contactInfo = contactInfo;
    }

    public String getContactInfo()
    {
        return contactInfo;
    }
    public void setAverageScore(Integer averageScore)
    {
        this.averageScore = averageScore;
    }

    public Integer getAverageScore()
    {
        return averageScore;
    }
    public void setCourse(String course)
    {
        this.course = course;
    }

    public String getCourse()
    {
        return course;
    }
    public void setVisitNumber(Long visitNumber)
    {
        this.visitNumber = visitNumber;
    }

    public Long getVisitNumber()
    {
        return visitNumber;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("workId", getWorkId())
                .append("userId", getUserId())
                .append("group", getGroup())
                .append("workName", getWorkName())
                .append("entrantName", getEntrantName())
                .append("contactInfo", getContactInfo())
                .append("averageScore", getAverageScore())
                .append("course", getCourse())
                .append("createTime", getCreateTime())
                .append("visitNumber", getVisitNumber())
                .toString();
    }
}
